from pymilvus import connections

from src.config import MILVUS_HOST, MILVUS_PORT, MILVUS_DB, MILVUS_USER, MILVUS_PASSWORD


def milvus_connect(alais: str):
    connections.connect(host=MILVUS_HOST, port=MILVUS_PORT, db_name=MILVUS_DB, alias=alais
                        ,user=MILVUS_USER, password=MILVUS_PASSWORD)


def disconnect_milvus(alais: str):
    connections.disconnect(alais)
